#include "iostream"
using namespace std;

class Cube
{
public:
	int getA()
	{
		return m_a;
	}
	int getB()
	{
		return m_b;
	}
	int getC()
	{
		return m_c;
	}

	void setABC(int a=0, int b = 0,int c=0)
	{
		m_a = a;
		m_b = b;
		m_c = c;
	}
	
	//
	void setA(int a)
	{
		m_a = a;
	}
	void setB(int b)
	{
		m_b = b;
	}
	void setC(int c)
	{
		m_c = c;
	}
public:
	int getV()
	{
		m_v = m_a*m_b*m_c;
		return m_v;
	}

	int getS()
	{
		m_s = 2*(m_a*m_b + m_b*m_c + m_a*m_c);
		return m_s;
	}

protected:
private:
	int m_a;
	int m_b;
	int m_c;
	int m_v;
	int m_s;
};

void main()
{
	Cube c1;
	c1.setA(1);
	c1.setB(2);
	c1.setC(3);

	cout<<"s是："<<c1.getS();
	Cube c2;
	c2.setABC(1, 2, 3); //默认参数
	cout<<"s是："<<c2.getS();



	system("pause");
}